<!DOCTYPE html>

<script src="../../../resources/js-test.js"></script>

<div style="display: none">
    <span id="host"></span>
</div>

<script>
    description("Tests adding a shadow root to a display none host doesn't leave dirty bits.");

    getComputedStyle(document.body).color; // recalcStyle.
    var root = document.getElementById("host").attachShadow({mode: 'open'});
    var inside = document.createElement("inside");
    root.appendChild(inside);

    shouldBeEqualToString("getComputedStyle(inside).borderWidth", "0px");
    inside.style.border = "10px solid red";
    shouldBeEqualToString("getComputedStyle(inside).borderWidth", "10px");
</script>
